package com.crm.jdy.service.drp;

import com.crm.jdy.common.dto.HSalaryInfoDto;
import com.crm.jdy.common.mapper.FRecordInfoMapper;
import com.crm.jdy.common.pojo.HSalaryInfo;
import com.crm.jdy.common.mapper.HSalaryInfoMapper;
import com.crm.jdy.common.pojo.TeamInfo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**   
 * @Description:(薪资表信息服务实现)
 *
 * @version: V1.0
 * @author: kong
 * 
 */
@Service(version = "${service.version}")
@Component
public class HSalaryInfoServiceImpl  extends ServiceImpl<HSalaryInfoMapper,HSalaryInfo> implements HSalaryInfoService  {


    @Autowired
    HSalaryInfoMapper hSalaryInfoMapper;


    @Override
    public boolean removeHSalaryInfo(String proId) {
        return hSalaryInfoMapper.deleteById(proId) > 0;
    }

    @Override
    public boolean addHSalaryInfo(HSalaryInfo wOutInfo) {
        return hSalaryInfoMapper.insert(wOutInfo) > 0;
    }

    @Override
    public boolean updateHSalaryInfo(HSalaryInfo wOutInfo) {
        return hSalaryInfoMapper.updateById(wOutInfo) > 0;
    }

    @Override
    public PageInfo<HSalaryInfo> seleteHSalaryInfo(HSalaryInfoDto wOutInfo) {
        PageHelper.startPage( wOutInfo.getCurrentPage(),wOutInfo.getPageSize());
        List<HSalaryInfo> bookList = hSalaryInfoMapper.seleteHSalaryInfo(wOutInfo);
        PageInfo<HSalaryInfo> pageInfo = new PageInfo<HSalaryInfo>(bookList);
        return pageInfo;
    }




}